package main

import "fmt"

func main() {
	i, j := 1, 2
	i, j = j, i
	fmt.Println("i:", i, " j: ", j)
	fmt.Println("-------------指针---------")

	var x, y int
	fmt.Println(&x == &y, &x == nil, &y == nil)
	fmt.Println("[返回局部变量指针函数f()]")
	fmt.Println(f() == f())
	fmt.Println("[变量+1]")
	p := 1
	fmt.Println(incr(&p))
}
func f() *int {
	v := 1
	return &v
}
func incr(p *int) int {
	*p++
	return *p
}
